<%
        // 创建报表头
        logger.info("3. 创建报表头");
        HSSFCellStyle reportHeadStyle = wb.createCellStyle();
        reportHeadStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 左右:居中
        reportHeadStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); // 上下:居中
        reportHeadStyle.setBorderTop(HSSFCellStyle.BORDER_THICK);
        reportHeadStyle.setBorderBottom(HSSFCellStyle.BORDER_THICK);
        reportHeadStyle.setBorderLeft(HSSFCellStyle.BORDER_THICK);
        reportHeadStyle.setBorderRight(HSSFCellStyle.BORDER_THICK);
        HSSFFont reportHeadFont = wb.createFont(); // 标题字体
        reportHeadFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); // 大粗
        reportHeadFont.setFontHeightInPoints((short)16); // 字体大小
        reportHeadStyle.setFont(reportHeadFont);
        Region region = new Region(0,(short)0,reportHeight,(short)(maxLength - 1));
        //指定合并区域
        this.fillMergedRegion(wb,
                              sheet,
                              region,
                              titleName,
                              reportHeadStyle);

        // 创建:创建时间 创建人
%>
<%!
        /**
         * 设置合并的区域的风格
         */
        public void setRegionStyle(HSSFWorkbook workbook,
                                   HSSFSheet sheet,
                                   Region region,
                                   HSSFCellStyle cs)
        {
                int toprowNum = region.getRowFrom();
                for (int i = region.getRowFrom(); i <= region.getRowTo(); i ++)
                {
                        HSSFRow row = sheet.createRow((short) i);
                        for (int j = region.getColumnFrom(); j <= region.getColumnTo(); j++)
                        {
                                HSSFCell cell = row.createCell((short)j);
                                cell.setEncoding(HSSFCell.ENCODING_UTF_16);
                                cell.setCellStyle(cs);
                        }
                }
        }
%>
<%!
        /**
         *
         */
        public void fillMergedRegion(HSSFWorkbook workbook,
                                     HSSFSheet sheet,
                                     Region region,
                                     String text,
                                     HSSFCellStyle cs)
        {
                setRegionStyle(workbook, sheet, region, cs);
                HSSFRow row;
                HSSFCell cell;
                row = sheet.getRow(region.getRowFrom());
                cell = row.getCell(region.getColumnFrom());
                cell.setCellValue(text);
                sheet.addMergedRegion(region);
        }
%>
